#!/bin/bash
set -e
set -x
MYDIR="${0%/*}"
cd "$MYDIR/.."
source "recipes/common.sh"


# RECIPE START hasher
# depends: apt-rpm
# depends: apt-repo-tools
# depends: ash
# depends: bash-builtin-lockf
# depends: cpio-static
# depends: findutils-static
# depends: hasher-priv
# depends: lz4

unset NIL
rm -rf build/hasher
cp -a hasher build/
cd build/hasher

make -j${NPROC} \
	HELP2MAN1=/bin/true \
	MAN2HTML=/bin/cat \
	$NIL

make -j${NPROC} \
	HELP2MAN1=/bin/true \
	MAN2HTML=/bin/cat \
	install \
	DESTDIR=`pwd`/inst \
	$NIL

rm -rf inst${prefix}/share/man
cd inst
find ${prefix#/} | cpio -pumd "$stage"
cd ../../..
rm -rf build/hasher

# RECIPE END hasher
